package biolabs.visual

/** Visualizer produces and returns visual representation of an object.
  * For visualization APIs that use drawing commands to create visual
  * output (e.g. Java2D), the visualizer can produce a procedure that
  * draws the visualization using the drawing commands.
  *
  * @tparam T type of the object that this visualizer can visualize
  * @tparam R type of the resulting visual representation
  */
trait Visualizer[-T, R] {

	/** Produces visual representation of the given object. */
	def visualize(o: T): R

}
